<template>
	<view class="record">
		<view class="record_tab tabtitle" v-if="list.length">
			<view class="period">
				{{ $t('game.period') }}
			</view>
			<!-- <view class="price">
				{{ $t('game.price') }}
			</view>
			<view class="number">
				{{ $t('game.number') }}
			</view> -->
			<view class="result">
				{{ $t('game.result') }}
			</view>
		</view>
		
		<view class="record_tab" v-for="(item, index) in list" :key="index">
			<view class="period">
				{{ item.pid }}
			</view>
			<!-- <view class="price">
				{{ item.price }}
			</view> -->
			<!-- <view class="number">
				<text>
						
				</text>
			</view> -->
			<view class="result">
				<!-- <template v-for="(ems, eindex) in item.color"> -->
					<view class="result_cicle" :class="[ item.number == '0' ? 'cviolet-red' : item.number == '5' ? 'cviolet-green' : Number(item.number)%2 == 1 ? 'cgreen' : 'cred']">
						<view>{{ item.number }}</view>
					</view>
				<!-- </template> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			list: {
				type: Array,
				default: () => {
					return []
				}
			}
		},
		data () {
			return {
				
			}
		},
		methods:{
			
		}
	}
</script>

<style lang="scss" scoped>
	.record {
		padding: 0 50rpx;
		background-color: #fff;
		.cgreen {
			background: #55E273;
		}
		
		.cviolet {
			background: #FF62FF;
		}
		
		.cred {
			background: #FF4343;
		}
		.cviolet-red {
			background: linear-gradient(to bottom, #FF62FF 0%, #FF62FF 50%, #FF4343 51%, #FF4343 100%);
		}
		.cviolet-green {
			background: linear-gradient(to bottom, #FF62FF 0%, #FF62FF 50%, #55E273 51%, #55E273 100%);
		}
		.record_tab {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 22rpx 0;
			border-top: 2rpx solid #efefef;
			font-size: 28rpx;
			font-family: Roboto, Roboto-Regular;
			font-weight: 400;
			color: #17273a;
			letter-spacing: 0rpx;
		
			.period {
				flex: 1.5;
			}
		
			.price {
				flex: 1;
				text-align: center;
			}
		
			.number {
				flex: 1;
				text-align: center;
				
				text {
					color: #FF4343;
				}
			}
		
			.result {
				flex: 1;
				text-align: center;
				display: flex;
				align-items: center;
				justify-content: center;
				
				.result_cicle {
					position: relative;
					width: 70rpx;
					line-height: 70rpx;
					font-size: 40rpx;
					color: #FFF;
					height: 70rpx;
					border-radius: 50%;
				
					&:nth-child(n+1) {
						margin-left: 6rpx;
					}
				}
			}
		}
		.tabtitle {
			color: #b9b9b9;
		}
	}
</style>
